1. Field of the Invention
The present invention relates to an updating and reference management system of a shared memory in which an updating request or a reference request for the shared memory from a process or an object in the process is executed after delaying, and relates to a reference timing control system in which a reference timing for the shared memory is controlled. More specifically, it relates to the updating and reference management system of the shared memory in which, in case of using an area on the shared memory between the processes or the objects, by not immediately executing it at the time point when the updating request or reference request to the area is received, but executing it after delaying once, gives an apparent identical time concept to a plurality of processes or objects associated with the area, and the reference timing control system in which a reference opportunity of the shared memory by the plurality of processes or objects is suppressed to a minimum to reduce overheads.
In recent years, as a performance of a computer system becomes higher, an artificial creature constituted by autonomous object groups is considered, and the time control of the artificial creature is required for a world where the artificial creature lives. Now, a time of the artificial creature is generated when the artificial creatures are related to each other, such as starting conversation or grasping the same object. Thus, an object group related to these situations shares the time with each other. Hereupon, the time sharing means that it is necessary to equalize the time progress in respective objects, and therefore, circumstances of the objects must be apparently identical. In this case, data on the memory shared between the objects corresponds to the circumstances of the objects.
2. Description of the Related Art
FIG. 1A, FIG. 1B show schematic diagrams for explaining a conventional synchronous method by a communication and a lock. Conventionally, when works are executed in synchronism between the processes, either a method of synchronizing the process to process communication as shown in FIG. 1A, or a method of synchronizing by the lock as shown in FIG. 1B is mainly adopted. That is, in an example shown in FIG. 1A, "MESSAGE", specifically, "MESSAGE-RECEIVE" and "MESSAGE-SEND" are sent and received between a process A and a process B for coordinating operation by synchronizing therebetween. Also, in an example shown in FIG. 1B, by using "LOCK" via the shared memory, data is protected between the process A and process B to synchronize therebetween.
In the example shown in FIG. 1A, though it is effective for synchronizing in case of a one to one relationship with a specific object by definite procedures, it is not so effective in case of an object such as the artificial creature.
In the example shown in FIG. 1B, even when the data can be protected by using the lock, the identical time can not be shared between the objects.
Also, when the identical time can be shared between the processes, each process has to refer to the shared memory in the state of keeping the identical time concept. However, as the number of processes increases, an access overhead for the shared memory becomes larger, and thus there is the possibility that it becomes difficult to maintain the identical time concept.
FIG. 2 is a schematic diagram for explaining the conventional problems, which shows a transition of variables on the shared memory. The case of executing processings as shown by the process A and process B, for the variable x=0 and y=0 which are the initial state, is considered. In case of executing the processing by the procedure (1), since x=0, first the process A writes y=1 into the shared memory, and then, since y=1 (when it is not y=0), the process B writes x=1 into the shared memory. As a result, in case of (1), x=1 and y=1 are written into the shared memory.
Meanwhile, in case of executing the processing by the procedure (2), since x=0, first the process B writes x=2, and then, since x=2 (when it is not x=0), the process A writes y=2. As a result, in case of (2), x=2 and y=2 are written into the shared memory. As such, depending upon the process which is executed first and whose result is executed, the result written into the shared memory is different.
As the above-mentioned examples, such a problem was encountered that, in the state where a plurality of objects share the time, the variables on the shared memory are updated to different states depending upon the executing sequences of the objects. In such a situation, the time is not shared by the objects and respective processes have their own times.